#include "document.h"
#include "visitor.h"

#include <iostream>

using namespace std;

int main()
{
	Document *pBackupDoc = new BackupDoc();
	Document *pRestoreDoc = new RestoreDoc();

	ShowVisitor showVisitor;
	OperationVisitor opeVisitor;

	pBackupDoc->setName("DriveBackup");
	pRestoreDoc->setName("FileRestore");

	pBackupDoc->setVisitor(showVisitor);
	pRestoreDoc->setVisitor(showVisitor);
	cout<<endl;

	pBackupDoc->setVisitor(opeVisitor);
	pRestoreDoc->setVisitor(opeVisitor);
	cout<<endl;

	delete pBackupDoc, pBackupDoc = NULL;
	delete pRestoreDoc, pRestoreDoc = NULL;

	return 0;
}
